package com.michael.thread;

import java.time.LocalDateTime;

public class ExtendThread extends Thread {
    @Override
    public void run() {
        while (true) {
            try {
                synchronized (this) {
                    System.out.println("wait.. " );
//                    wait();
                }
                //
                interrupt();
                System.out.println("true = " + true);
            } catch (Exception e) {
                e.printStackTrace();
            }
//            System.out.println("interrupt = " + this.isInterrupted());
            System.out.println(LocalDateTime.now().toString());
        }
    }
}
